package com.numberone.system.domain;


import com.numberone.common.base.BaseEntity;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 商品订单表 xy_order
 * 
 * @author numberone
 * @date 2020-10-10
 */
@Getter
@Setter
@Data
public class XyOrder extends BaseEntity
{
	private static final long serialVersionUID = 1L;
	
	/** 编号 */
	private Long id;
	/** 订单号 */
	private String orderNumber;
	/** 商品规格 */
	private Long goodsDetailId;
	/** 店铺id */
	private Long shopId;
	/** 用户id */
	private Long userId;
	/** 收货信息id */
	private Long addressId;
	/** 增值业务id */
	private Long mvasId;
	/** 购买数量 */
	private Integer quantity;
	/** 运费 */
	private BigDecimal fare;
	/** 商品总价格 */
	private BigDecimal price;
	/** 订单价格 */
	private BigDecimal orderPrice;
	/** 状态(0待付款 1待发货 2待收货 3交易成功 4交易失败 5退款中 6完成退款) */
	private Integer status;
	/** 订单创建时间 */
	private Date startTime;
	/** 机器ip地址 */
	private String ip;

	private String payNum;

	private String openId;

	private Integer isAssess;

	private Shop shop;

	private GoodsDetail goodsDetail;

	private List<XyOrder> orderList;

    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderNumber", getOrderNumber())
            .append("goodsDetailId", getGoodsDetailId())
            .append("shopId", getShopId())
            .append("userId", getUserId())
            .append("addressId", getAddressId())
            .append("mvasId", getMvasId())
            .append("quantity", getQuantity())
            .append("fare", getFare())
            .append("price", getPrice())
            .append("orderPrice", getOrderPrice())
            .append("status", getStatus())
            .append("startTime", getStartTime())
            .toString();
    }
}
